Skip to content

Fixes to check_debug and adds support for Django 1.10 (the issues were heavily intertwined) #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jan 17, 2017

Conversation

PamelaM
Copy link
Collaborator

@PamelaM PamelaM commented Jan 14, 2017

Addresses a few issues:

Not sure how to test that settings.py gets coverage in the current environment. I'm looking into creating a test_project that can be used for integration tests.

@PamelaM PamelaM changed the title Defer running check_debug until settings.configured = True Fixes to check_debug, deferring settings check until they've been configured Jan 14, 2017
if template_settings['BACKEND'] != 'django.template.backends.django.DjangoTemplates':
raise DjangoTemplatePluginException("Can't use non-Django templates.")
if not template_settings.get('OPTIONS', {}).get('debug', False):
if not settings.configured:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's how we defer check_debug until settings are configured. Note that we can't really encounter the case where we'd be tracing a template until after settings have been configured because the template can't be run without configured settings.

@PamelaM PamelaM changed the title Fixes to check_debug, deferring settings check until they've been configured Fixes to check_debug and adds support for Django 1.10 (the issues were heavily intertwined) Jan 15, 2017
@nedbat
Copy link
Owner

nedbat commented Jan 15, 2017

@PamelaM !! Wow. Let me know when you are done with commits. Finding me on IRC or Slack would be cool too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants